package org.clusterbomb.core.context;

import java.util.concurrent.atomic.AtomicBoolean;

import org.clusterbomb.core.job.DeploymentJob;

/*
 * Global context.  It's lifecycle lasts throughout the entire deployment.
 */

public class DeploymentContext {

	private DeploymentJob job;
	
	private AtomicBoolean deploymentFailed = new AtomicBoolean(false);

	public DeploymentJob getJob() {
		return job;
	}

	public void setJob(DeploymentJob job) {
		this.job = job;
	}
	
	public void log(String logLine) throws Exception {
		
		System.out.println(logLine);
		
	}
	
	public void fatalError(String reasonKey) {
		
		deploymentFailed.set(true);
		
	}
	
		
	
	
	
}
